import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SEntityId } from "../Public/SEntityId";
import { SPetArenaInfo } from "./SPetArenaInfo";
type int = number;
//class SPetArenaChallenge
    
    export  class SPetArenaChallenge extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPetArenaChallenge();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.entityId.__write(arg1);
            arg1.writeBool(this.lockAttribute);
            arg1.writeString(this.fightAttributeStr);
            arg1.writeString(this.petInfoStr);
            this.arenaInfo.__write(arg1);
            arg1.writeInt(this.challengeType);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(arg1);
            this.lockAttribute = arg1.readBool();
            this.fightAttributeStr = arg1.readString();
            this.petInfoStr = arg1.readString();
            this.arenaInfo = new SPetArenaInfo();
            this.arenaInfo.__read(arg1);
            this.challengeType = arg1.readInt();
            return;
        }

        public /* const */_type: int=12405;

        public /* var */entityId: SEntityId;

        public /* var */lockAttribute: Boolean;

        public /* var */fightAttributeStr: string;

        public /* var */petInfoStr: string;

        public /* var */arenaInfo: SPetArenaInfo;

        public /* var */challengeType: int;

        public static /* var */_regist: SPetArenaChallenge;
    }

            SPetArenaChallenge._regist = new SPetArenaChallenge(true);
        